# -*- coding:utf-8 -*-

# 三个槽，三个值
str = "{},{},{}".format('yejing','guangzhou',23)

print(str)

# 填充 对齐 宽度

x = 'a b'

y = ''.join(x.split()) == x

print(y)

'''
空值、空字符串、空列表、空元组、空字典、空集合、空迭代对象
'''


'''
python
'''

str = 'hello world'

s = str[0:2] # 创建一个新的字符串
s = str[:]
s = str[0:]
print(s)
print(str)

# 反向获取，最后一位的索引是-1
s = str[-3:] # 获取到rld
s = str[-1] # 获取到d
s = str[-3:-1] # 获取到 rl 没有包含d
print(s)



# 字符串拼接

x = '2008'
y = '北京奥运会'

print(x + y)

print('北京' in y)

for s in y:
    print(s)

